package com.glela.order.service.impl.vo;

import com.glela.platform.model.response.ResponseUser;

/**
 * 订单用户关系
 * @author zls
 *
 */
public class OrderUserRelationshipVo {
	private boolean			shareOrder;				//分享关系
	private long			userId, shareUserId;
	private ResponseUser	user;
	private ResponseUser	recommendUser;
	private ResponseUser	recommendTeacherUser;
	private ResponseUser	shareUser;
	private ResponseUser	shareTeacherUser;

	/** 下单用户是否存在 */
	public boolean hasUser() {
		return getUser() != null;
	}

	/** 登陆人有推荐人 */
	public boolean hasRUser() {
		return getRecommendUser() != null;
	}

	/** 分享人是否存在 */
	public boolean hasSUser() {
		return getShareUser() != null;
	}

	/** 分享人讲师是否存在 */
	public boolean hasSTUser() {
		return getShareTeacherUser() != null;
	}

	public OrderUserRelationshipVo(long userId, long shareUserId) {
		super();
		this.userId = userId;
		this.shareUserId = shareUserId;
		setFenxiang(shareUserId > 0);
	}

	/*-----------*/

	public ResponseUser getUser() {
		return user;
	}

	public boolean isShareOrder() {
		return shareOrder;
	}

	private void setFenxiang(boolean isFenxiang) {
		this.shareOrder = isFenxiang;
	}

	public long getUserId() {
		return userId;
	}

	public long getShareUserId() {
		return shareUserId;
	}

	public void setUser(ResponseUser user) {
		this.user = user;
	}

	public ResponseUser getRecommendUser() {
		return recommendUser;
	}

	public void setRecommendUser(ResponseUser recommendUser) {
		this.recommendUser = recommendUser;
	}

	public ResponseUser getRecommendTeacherUser() {
		return recommendTeacherUser;
	}

	public void setRecommendTeacherUser(ResponseUser recommendTeacherUser) {
		this.recommendTeacherUser = recommendTeacherUser;
	}

	public ResponseUser getShareUser() {
		return shareUser;
	}

	public void setShareUser(ResponseUser shareUser) {
		this.shareUser = shareUser;
	}

	public ResponseUser getShareTeacherUser() {
		return shareTeacherUser;
	}

	public void setShareTeacherUser(ResponseUser shareTeacherUser) {
		this.shareTeacherUser = shareTeacherUser;
	}

}